package chapter08;

import java.util.Scanner;

public class Day11 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个数:");
        int number = input.nextInt();
        int count= 0;
        for(int i=1; i<=number; i++){
            if(number%i==0) {
                count++;
            }
        }
        if(count==2) {
            System.out.println(number + "是质数");
        }else {
            System.out.println(number+"不是质数");
        }
    }
}
